# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=atomicparsley
pkgver=20240608
_pkgtag=083822.1ed9031
pkgrel=0
pkgdesc="A command line program for reading, parsing and setting iTunes-style metadata in MPEG4 files"
url="https://atomicparsley.sourceforge.net/"
arch="all"
options="!check" # no test/check available
license="GPL-2.0-or-later"
makedepends="cmake samurai zlib-dev linux-headers"
source="$pkgname-$pkgver.tar.gz::https://github.com/wez/atomicparsley/archive/$pkgver.$_pkgtag.tar.gz"
builddir="$srcdir/$pkgname-$pkgver.$_pkgtag"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
	# install -Dm755 AtomicParsley "$pkgdir"/usr/bin/AtomicParsley
	ln -s AtomicParsley "$pkgdir"/usr/bin/$pkgname
}

sha512sums="
dec0dc1780389ac776c188586b7bba24a4aaeedd5f182d2ba182443d81516a1556577b2feceadbecc5a055e9579b65dcc91b701316fe7f107a80d2a903afc3f5  atomicparsley-20240608.tar.gz
"
